home *** CD-ROM | disk | FTP | other *** search
- package sub_arctic.demo_apps;
-
- import sub_arctic.lib.label;
- import sub_arctic.lib.oneline_text_display;
- import sub_arctic.lib.base_parent_interactor;
- import sub_arctic.constraints.std_function;
-
- /**
- * This little composite displays a label and oneline_text_display.
- */
-
- public class field extends base_parent_interactor {
- /**
- * Construct a field given the name and value and how wide to make
- * the label.
- */
- public field(String name, int name_width, String value) {
- label l =new label(name,name_width);
- oneline_text_display otd=new oneline_text_display(value);
- add_child(l);
- add_child(otd);
-
- /* set the constraints on us first */
- set_x_constraint(std_function.offset(ZERO,10));
- set_w_constraint(std_function.offset(PARENT.W(),-10));
- set_h_constraint(std_function.eq(MAX_CHILD.H()));
- /* put the constraints/values on the kids */
- l.set_x(0);
- l.set_y(0);
- otd.set_x_constraint(std_function.offset(PREV_SIBLING.X2(),10));
- otd.set_w_constraint(std_function.fill(PREV_SIBLING.X2(),PARENT.X2(),20));
- otd.set_y(0);
- }
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-